import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
//双向绑定需要引入 FormsModule 功能
import { FormsModule } from "@angular/forms";

import { AppComponent } from './app.component';
import { HeroesComponent } from './heroes/heroes.component';
import { HeroDetailComponent } from './hero-detail/hero-detail.component';
import { MessagesComponent } from './messages/messages.component';
import { AppRoutingModule } from './app-routing.module';

//把 FormsModule 添加到 @NgModule 元数据的 imports 数组中，
//这里是该应用所需外部模块的列表
//declarations 申明
@NgModule({
  declarations: [
    AppComponent,
    HeroesComponent,
    HeroDetailComponent,
    AppRoutingModule,
    MessagesComponent
  ],
  imports: [
    BrowserModule,
    FormsModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
